<table class="ptop" border="0" cellpadding="4" cellspacing="0" width="100%">
         <thead>
            <tr class="nobg">
                <th colspan="3"><h2><?$print_com_name?></h2></th>
            </tr>
            <tr class="nobg">
                <th colspan="3"><h1 class="center"><?$page_title?></h1></th>
            </tr>
        </thead> 
        <tbody>
            <tr>
                    <td valign="top">仓库： &nbsp; <? $inbound.warehouse ?></td>
                    <td width="15%" class="right">单号：</td>
                    <td width="35%"><? $inbound.sno ?></td>
            </tr>
            <tr>
                    <td>入库类型： &nbsp; <?= BoundHelper::type2txt($inbound.type) ?>
                            <{if $inbound.type==Bound::TYPE_LL}> (<{= ReviewerHelper::flow2txt($inbound.audit_flow)}>)<{/if}>
                    </td>
                    <td class="right">日期：</td>
                    <td><?= date('Y-m-d H:i', $inbound.addtime) ?></td>
            </tr>
       </tbody>
</table>

<table border=0 class="list pcontent" width="100%">
    <thead>
        <tr class="nobg">
                <th>序号</th>
                <th>编号</th>
                <th>材料名称</th>
                <th>品牌</th>
                <th>规格</th>
                <th>单位</th>
                <th>数量</th>
                <th>单价</th>
                <th>金额</th>
                <th>备注</th>
        </tr>
    </thead>
    <tbody>
<? $amount = 0; $i=1; ?>
<{foreach item=ware from=$inbound.items}>
	<tr>
		<td><? $i?></td>
                <td><{$ware.sno}></td>
		<td><{$ware.name}></td>
		<td><{$ware.brand}></td>
		<td><{$ware.specific}></td>
		<td><{$ware.unit}></td>
		<td class="decimal"><{$ware.amount}></td>
                <td class="fnum"><{$ware.price}></td>
		<td class="fnum"><{= $ware.price * $ware.amount}></td>
		<td class="text"><{= $ware.remark}></td>
	</tr>
	<? $amount += $ware.price * $ware.amount;$i++; ?>
<{/foreach}>
<?php
//if($i<10)
//{
//    $a = 10-$i;
//    for($n=0;$n<=$a;$n++)
//    {
//       echo "<tr><td>{$i}</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>"; 
//       $i++;
//     }
//}
?>
	<tr class="hl">
		<td colspan="8">合计</td>
		<td class="fnum"><? $amount ?></td>
		<td>&nbsp;</td>
	</tr>
</tbody>
</table>
